package com.ym.medical.service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.ym.core.utils.tkmybatis.IBaseSV;
import com.ym.medical.domain.entity.CounsellingRoomEntity;
import com.ym.medical.domain.param.CounsellingRoomParam;
import com.ym.medical.domain.vo.CounsellingRoomRecordVO;
import com.ym.medical.domain.vo.DoctorPraisedVo;

import java.util.List;

/**
 * counselling_room
 *
 * @author 625 2019-04-25
 */
public interface ICounsellingRoomSV extends IBaseSV<CounsellingRoomEntity> {

	/**
	 * 更新
	 */
	public void update(CounsellingRoomEntity counsellingRoom);


	public PageInfo<CounsellingRoomEntity> listPage(CounsellingRoomParam counsellingRoom, int pageNum, int pageSize);

	/**
	 * Load查询
	 */
	public CounsellingRoomEntity load(long id);

	/**
	 * 根据model查找
	 *
	 * @param counsellingRoomModel
	 * @return
	 */
	CounsellingRoomEntity findByModel(CounsellingRoomEntity counsellingRoomModel);

	/**
	 * 获取医生端问诊记录
	 */
	List<CounsellingRoomRecordVO> listDoctorVisitRecord(CounsellingRoomParam counsellingRoom);

	/**
	 * 获取医生端问诊记录
	 */
	PageInfo<CounsellingRoomRecordVO> listPageDoctorVisitRecord(CounsellingRoomParam counsellingRoom, int pageNum, int pageSize);


	/**
	 * 获取小程序问诊记录
	 */
	PageInfo<CounsellingRoomRecordVO> listPagePatientVisitRecord(CounsellingRoomParam counsellingRoom, int pageNum, int pageSize);

	/**
	 * 获取小程序问诊记录
	 */
	List<CounsellingRoomRecordVO> listPatientVisitRecord(CounsellingRoomParam counsellingRoom);

	/**
	 * 患者端-医生（咨询人数，好评率，同行打分）
	 *
	 * @param doctorId
	 * @return
	 */
	DoctorPraisedVo evaluate(Long doctorId);

	/**
	 * 根据聊天室id获取订单信息
	 *
	 * @param roomId
	 * @return
	 */
	List<JSONObject> getOrderInfoByRoomId(Long roomId);

	/**
	 * 医生端，答复列表
	 *
	 * @param model
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	PageInfo<CounsellingRoomRecordVO> theInquiryList(CounsellingRoomParam model, int pageNum, int pageSize);

	/**
	 * 问诊订单详情
	 *
	 * @param model
	 * @return
	 */
	CounsellingRoomRecordVO inquiryInfo(CounsellingRoomParam model);

	/**
	 * 患者问某个医生的问诊记录
	 *
	 * @param model
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	PageInfo<CounsellingRoomRecordVO> patientConsultationRecord(CounsellingRoomParam model, int pageNum, int pageSize);
}
